3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
A general polygon is a closed plane figure defined by one or more lists of vertices. (In other words, a general polygon is a polygon defined by one or more contours.) Each contour may be concave or convex, and contours may be nested. In addition, a general polygon's contours may overlap or be disjoint. All contours, however, must be coplanar. A general polygon can have holes in it; if it does, the even-odd rule is used to determine which parts are inside the polygon. Figure 23 shows a general polygon.
The entire general polygon can have a set of attributes, and any or all of the vertices of any contour can have a set of attributes.
The orientation of a general polygon is determined by the order of the first three noncolinear and noncoincident vertices in the first contour of the general polygon and by the current orientation style of the model containing the polygon. See the chapter "Style Objects" for more information on orientation styles.
A general polygon is defined by the TQ3GeneralPolygonData data type. See "Creating and Editing General Polygons" for a description of the routines you can use to create and edit general polygons.
typedef struct TQ3GeneralPolygonData {
unsigned long numContours;
TQ3GeneralPolygonContourData *contours;
TQ3GeneralPolygonShapeHint shapeHint;
TQ3AttributeSet generalPolygonAttributeSet;
} TQ3GeneralPolygonData;
The elements of the array of contours pointed to by the contours field are of type TQ3GeneralPolygonContourData , defined as follows:
typedef struct TQ3GeneralPolygonContourData {
unsigned long numVertices;
TQ3Vertex3D *vertices;
} TQ3GeneralPolygonContourData;
Previous | QD3D Book | Overview | Chapter Contents | Next |